package org.honeyweb.gsoc.services.impl;

import java.util.ArrayList;

import org.honeyweb.gsoc.dao.UrlsDao;
import org.honeyweb.gsoc.model.Urls;
import org.honeyweb.gsoc.services.UrlsManager;

public class UrlsManagerImpl implements UrlsManager {

    private UrlsDao urlsDao = null;
    
	/**
     * setter to allows spring to inject urlsDao implementation
     * @param urlsDao : object (implementation of UrlsDao interface) to inject.
     */
    public void setUrlsDao(UrlsDao urlsDao) {
		this.urlsDao = urlsDao;
	}
    
	public ArrayList<Urls> getResults(int id_user){
		ArrayList<Urls> urlsArray = new ArrayList<Urls>();
		urlsArray = this.urlsDao.getUrls(id_user);
		return urlsArray;
	}
}
